package com.yequan.thread.lock.reentrantlock.pc;

public class Run {

    public static void main(String[] args) {
        MyService myService = new MyService();
        PThread pThread1 = new PThread(myService);
        pThread1.setName("生产者111");
        pThread1.start();
        PThread pThread2 = new PThread(myService);
        pThread2.setName("生产者222");
        pThread2.start();
        PThread pThread3 = new PThread(myService);
        pThread3.setName("生产者333");
        pThread3.start();
        CThread cThread1 = new CThread(myService);
        cThread1.setName("消费者111");
        cThread1.start();
        CThread cThread2 = new CThread(myService);
        cThread2.setName("消费者222");
        cThread2.start();
        CThread cThread3 = new CThread(myService);
        cThread3.setName("消费者333");
        cThread3.start();
    }

}
